//获取当前时间，格式YYYY-MM-DD
    function getNowFormatDate(initdate) {
        var date = new Date(initdate);
        var seperator1 = "-";
        var year = date.getFullYear();
        var month = date.getMonth() + 1;
        var strDate = date.getDate();
        if (month >= 1 && month <= 9) {
            month = "0" + month;
        }
        if (strDate >= 0 && strDate <= 9) {
            strDate = "0" + strDate;
        }
        var currentdate = year + seperator1 + month + seperator1 + strDate;
        return currentdate;
    }
    
    //获取是当前星期的 日期,dayno 本周的第几天
    function getCurrentWeekDay(dayno){
    	var dd = new Date();
    	var week = dd.getDay(); //获取时间的星期数
    	//alert(week);
        var minus = week ? week - 1 : 6;
        //alert(minus);
        dd.setDate(dd.getDate() - minus + dayno); //获取minus天前的日期 
        var y = dd.getFullYear();
        var m = dd.getMonth() + 1; //获取月份 
        var d = dd.getDate();
        return y + "-" + m + "-" + d;
    }
    
    function getDayofWeek(day){
    	var weekday=new Array(7);
    	weekday[0]="星期一";
    	weekday[1]="星期二";
    	weekday[2]="星期三";
    	weekday[3]="星期四";
    	weekday[4]="星期五";
    	weekday[5]="星期六";
    	weekday[6]="星期日";
    	var dd = new Date(day);
    	var week = dd.getDay(); 
    	var dayofweek = week ? week - 1 : 6;
    	
    	return weekday[dayofweek];
    }